<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>头部信息</title>
	<style type="text/css">
	#header{
		background-color: #708090;
		color: white;
		text-align: center;
		height: 80px;
	}
	#headerleft{
		float: left;
		height: 60px;
	}
/*	#headerright{
		float: right;
		height: 60px;
		text-align: center;
	}
	#headerspan{
		padding: 10px;
	}*/
	.nav {
			float: right;
			font-size: 20px;
			margin-top: 30px;
			margin-right: 20px;
		}
 
		.nav .active a {
			color: red;
		}

		.nav a {
			margin-right: 10px;
			color: #fff;
		}
	</style>
</head>
<body>
<div id="header">
	<div id="headerleft">
		<h1>机房留言本系统V1.0</h1>
	</div>
	<!-- <div id="headerright">
		<span id="headerspan"><a href="">首页</a></span>
		<span id="headerspan"><a href="">登录</a></span>
		<span id="headerspan">注册</span>
	</div> -->
	<div class="nav">
		<span class="active"><a href="index.php">首页</a></span>
		<span><a href="fabuliuyan.php">留言</a></span>
<?php
if(isset($_COOKIE["username"]) && $_COOKIE["username"] != NULL) {

	$username = $_COOKIE["username"];

	echo <<<headerlogin
		<span><a href="">{$username}</a></span>
		<span><a href="logout.php?action=logout" class='a_position'>退出登录</a></span>
headerlogin;

} else {
	echo <<<login
		<span><a href="register.php">注册</a></span>
		<span><a href="login.php">登录</a></span>
login;

}

?>
	</div>
</div>
</body>
</html>